package manager

import (
	"hermestrans/internal/dataccess"
	config "hermestrans/internal/portal/config"
)

type RedisMgr struct {
	*dataccess.RedisClient
}

func InitRedisManager(conf *config.Config) (*RedisMgr, error) {
	var (
		err         error
		redisClient *dataccess.RedisClient
	)
	redisClient, err = dataccess.NewRedisCli(conf.RedisConfig.Addr, conf.RedisConfig.Password, conf.RedisConfig.Db)
	ret := &RedisMgr{
		redisClient,
	}
	return ret, err
}
